projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99b2c76
)
tools/hotplug/Linux: force release lock if holder process is gone (fix)
author
Kouya Shimura
<kouya@jp.fujitsu.com>
Wed, 15 Dec 2010 16:49:06 +0000
(16:49 +0000)
committer
Kouya Shimura
<kouya@jp.fujitsu.com>
Wed, 15 Dec 2010 16:49:06 +0000
(16:49 +0000)
22508:
57907b28e51a
was unsafe for mutual exclusion. There is a case
that the owner file doesn't exist yet when an atomic mkdir operation
fails.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/hotplug/Linux/locking.sh
patch
|
blob
|
history
diff --git
a/tools/hotplug/Linux/locking.sh
b/tools/hotplug/Linux/locking.sh
index 8748d95454b6b053e711deee76c318f1ac3de2cd..e233c4763a34704b7f061497b2ae32064d74585f 100644
(file)
--- a/
tools/hotplug/Linux/locking.sh
+++ b/
tools/hotplug/Linux/locking.sh
@@
-63,7
+63,7
@@
_claim_lock()
retries=0
else
local pid=$(echo $owner | cut -d : -f 1)
- if [ ! -f "/proc/$pid/status" ]
+ if [
-n "$pid" -a "$pid" != "unknown" -a
! -f "/proc/$pid/status" ]
then
_release_lock $lockdir
fi